﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.IO;

namespace Election.BanToChucBinhBau
{
    public partial class ThongTinUngCuVienUC : UserControl
    {
        private string _maTV;
        private string _ten;
        private string _maUCV;
        private string _imageSrcFile;
        private string _quaTrinhCT; //qua trinh cong tac
        public ThongTinUngCuVienUC()
        {
            InitializeComponent();
        }

        public ThongTinUngCuVienUC(string maTV, string ten, string maUCV, string quaTrinhCt, string filePath)
        {
            InitializeComponent();

            //set parameters to properties
            this._maTV = maTV;
            this._ten = ten;
            this._maUCV = maUCV;
            this._imageSrcFile = filePath;
            this._quaTrinhCT = quaTrinhCt;

            //set properties to GUI
            this.maTVLbl.Text = this._maTV;
            this.tenLbl.Text = this._ten;
            this.maUCVLbl.Text = this._maUCV;
            this.quaTrinhCTRTxtBox.Text = this._quaTrinhCT;
            if (File.Exists(this._imageSrcFile))
                this.pictureBox.Image = Image.FromFile(this._imageSrcFile);
            //else
            //    this.pictureBox.Image = Image.FromFile(orcl.imagePath + "invalid.png");
        }

        private void ThongTinUngCuVienUC_Load(object sender, EventArgs e)
        {

        }
    }
}
